package com.pigs.pigscheckinginsystem.entity;


import java.io.Serializable;

import cn.afterturn.easypoi.excel.annotation.Excel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

/**
 * <p>
 * 
 * </p>
 *
 * @author PIGS
 * @since 2020-04-22
 *
 *    @Field("content") 如果字段不对需要添加 注解
 */
@Document(collection = "comment")
@CompoundIndex( def = "{'userid': 1, 'nickname': -1}") //复合索引
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CheckingIn implements Serializable {


    /**
     *  用户ID
     */
    @Excel(name = "用户ID", width = 15)
    private Integer userId;

    /**
     *  用户名
     *  添加索引
     */
    @Indexed
    @Excel(name = "用户名", width = 15)
    private String userName;

    /**
     *  签到时间
     */
    @Excel(name = "签到时间", format = "yyyy-MM-dd", width =25)
    private String punchInTime;

    /**
     *  签退时间
     */
    @Excel(name = "签退时间", format = "yyyy-MM-dd", width =25)
    private String punchOutTime;

    /**
     *  考勤时间
     */
    @Excel(name = "考勤时间", format = "yyyy-MM-dd", width = 25)
    private String attendanceTime;

    /**
     *  迟到原因备注
     */
    @Excel(name = "迟到原因备注", width = 15)
    private String remark;

    /**
     *  ip地址
     */
    @Excel(name = "ip地址", width = 15)
    private String userIp;



}
